home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Business Master (4th Edition)
/
The Business Master - 4th Edition.iso
/
files
/
wordsing
/
kdqwik
/
kdcalc.doc
< prev
next >
Wrap
Text File
|
1989-05-25
|
17KB
|
357 lines
KDCalc
KDCalc Version 7.0 - May 1989
A Product of KD Ranch Enterprises (c)
GENERAL:
KDCalc is a PC implementation of a simple hand-held calculator with
a few extended functions thrown in.
It will add, subtract, multiply and divide. It uses an on-screen
tape, capability to list the tape on a printer and features a nine memory
register sub-function for storage and recall. It also has a special
formula generator allowing entry of complex numeric formulas (like a
spreadsheet cell). It can be made memory resident.
KDCalc was written in Turbo Pascal 5.0 with the TSR code courtesy of
my brother-in-law (true), Ken Pottebaum.
HISTORY:
Versions 1.0 to 1.7 - Written in BASIC (Not released)
Versions 3.0 to 3.6 - Written in Turbo Pascal 3.0 (Beta only)
Versions 4.0 to 4.2 - Written in Turbo Pascal 4.0 (TSR added - Beta tests)
Versions 5.0 to 6.2 - Written in Turbo Pascal 5.0 (Local releases only)
Version 7.0 - First Public Release (May 1989)
COMMAND SYNTAX:
>KDCalc [/M] [/C] [/A] [/L] [/R] [/"x"] [Kxt(at)(ate)] [Fn] [Bn] [Mn]
Believe it or not, with all those parameters, none are required.
Parameters that start with a "/":
All parameters that start with a "/" deal with memory residency.
To make KDCalc memory resident, use the "/M". Assuming that "/M" was
used, the remaining "/" parameters allow you to define the ACTIVATION
KEY Combination (Hot-Key). C = Cntl; A = Alt; R = Right Shift;
L = Left Shift and "x" = any NORMAL key (a-z,0-9). You must use the
double quotes (") around the NORMAL key. Any combination of Cntl/
Alt/Left Shift/Right Shift plus a NORMAL key is OK as long as you use
only one of each. EXAMPLES:
>KDCalc /M /C /"C" Hot-Key is [Cntl][C]
>KDCalc /a /L /R /"z" /m Hot-Key is [R Sft][L Sft][Alt][Z]
>KDCalc /l /c /"3" No Hot-Key -- you forgot the /M !!!
Hot-Key means press the ACTIVATION KEY combination simultaneously.
The order and case of these parameters makes no difference, but they
must be separated by a space. [Cntl][K] is the default Hot-Key.
Parameters that start with K,F,B or M:
The "K" parameter signifies KeyPad type. The options are:
Kxt - XT style keypad; Kat - AT style; Kate - Enhanced style.
This parameter is not really significant -- it only affects the
display the calculator works the same regardless only the position
of some of the keys may be a little different. The AT Enhanced (ate)
keypad is the default. The keypad layout cannot be changed from
within the calculator.
The "F" and "B" parameters define your color choices - foreground
and background. Foreground accepts values from 0 - 15, background
0 - 7. If any of these numbers are out of range, the default -
15 (white), 1 (blue) will be used. These colors can be adjusted
from within the calculator.
The "M" (mode) parameter controls whether KDCalc starts in "FLOAT" or
"DOLLAR" mode. FLOAT is the default. If you prefer "DOLLAR", use a
2 as this last parameter -- see FUNCTIONS for explanation of these
modes. This mode can be changed from inside the calculator.
The K,F,B and M parameters work with both resident and non-resident
approaches. Some more EXAMPLES:
>KDCalc (non-resident,AT enhanced keypad,white on blue,floating decimal)
>KDCalc f0 m2 b2 kxt (non-resident,XT keypad,black on green,dollar mode)
>KDCalc B4 kat /C m2 /"q" /m /L (resident,Hot-Key=[L Sft][Cntl][Q],
AT keypad,white on red,dollar mode)
USAGE:
As I said, the calculator emulates a hand-held version.
Calculations are entered and performed just like you would
say them:
You would say,
"6 plus 5 minus 13 times 4 divided by 2 equals".
You would enter,
6 + 5 - 13 * 4 / 2 = (NOTE: "=" is the ENTER key)
Actually, if you don't know how a cheap hand-held calculator
works, you probably don't need this program.
The KeyPad shown on the screen is the one you have chosen via the
command line parameter or, by default, an enhanced keyboard.
Other keyboards will work the same, only the location of some
keys may be different.
KDCalc will automatically turn your NumLock and CapsLock on and
return them to their original state when you exit the program.
LEAVE THESE KEYS ON WHILE OPERATING THE CALCULATOR. If for some
strange reason they are not automatically activated, please turn
them on.
FUNCTIONS:
The screen displays all keys that are active in the boxes
somewhere around the keypad display. The H key (help) will
display a brief description of each key usage.
I don't plan to explain the white keys from the keypad or
the specific application of the * / + keys, however
the following is offered:
Operator Keys:
Operator keys cause the calculator to PERFORM AN OPERATION
affecting the results shown in the display window and/or
the screen listing.
The keys are: +,*,/,=(ENTER),S and sometimes - and R.
Also, while they are not strictly "operators", O and C
will have some similar effects. You might note that the
current mathematical operator (+,*,/,-) is always hilighted
on the keypad display. + is the default operator.
Minus Key (-):
The minus key has two functions depending on when it is
hit. If used directly after any operator, it simply
becomes part of the next number entered, making it a
negative number. Otherwise, it is an operator representing
the subtraction function.
Equal Key (= or ENTER):
Your display will always show the current running total
after hitting an operator key. The Equal key will clear
the display and the running total, setting the current
total to 0. Remember, the Equal key is also an operator.
Help (H):
Opens a window with some very brief help notes about what
non-number keys do.
Locate (L):
Moves the calculator on the screen (left,right,center) in
case it might be covering some data you want to reference.
ForeGround (F) and BackGround (B):
Each of these keys will "roll" through the available colors for
their respective areas. ForeGround will return to 0 after 15 and
BackGround returns after 7.
Dollar/Float Toggle (D):
Toggles between Dollar Mode and Float Mode. Dollar mode
always assumes 2 decimals -- particularly useful to do
checkbooks and stuff. In Dollar Mode the decimal key is
disabled. If you hit 123 the display will read 1.23. Be
careful of multiply and divide in Dollar Mode (keystrokes
"123 * 2" will result in 1.23 * .02 -- that result is NOT
246 -- it will be 0.02). I recommend using Float mode to
multiply or divide. Float mode allows you to place the
decimal and results will be rounded to the maximum capacity
of the calculator. If Dollar mode is active, the "D" box will
be hilighted.
Tape Scroller (T):
Executes a sub-function allowing you to scroll through the tape
listing that has "scrolled off the screen". It is limited to 500
previous entries. The tape scroll buffer is cleared at startup
and whenever "Over" (see below) is executed.
Printer Toggle (P):
Toggles printer on and off. Obviously this assumes you have
a printer and would like a tape of your activity. Most line
feed type printers should work (don't use a laser). There is
an error message built in if your printer is not ready to
print, but I have found that checking the availability of a
printer is not always reliable (funny switch settings, certain
ram and external buffers, etc.). You'll just have to try it.
If the Printer is toggled on, the "P" box will be hilighted.
Subtotal (S):
Subtotal does pretty much what you expect. It lists the current
running total without clearing it.
Clear (C) and Backspace (<-):
Clear DOES NOT clear the running total. Its only
function is to remove all numbers that you have entered
in prior to hitting an operator key. Backspace removes
one number at a time. Hitting the Backspace key an
appropriate number of times will produce the same results
as Clear.
Over (O):
Over is just a quick way to remove the screen listing and reset
the calculator. It will also set the printer toggle off and clear
the tape scroller buffer. The Dollar/Float toggle and colors will
return to their startup settings. The memory registers stay intact.
Quit (Q) or Esc or ` (backtic) or Shft/x:
You guessed it - EXIT. There is NO WARNING like "are you sure?".
This isn't like a spreadsheet that you may have worked on for hours.
I figure that if your done, your done! KDCalc has multiple exit options
due to various requests received during beta testing.
See RESIDENT NOTES below for more information on the Shft/x exit.
Memory Storage (M):
Memory will "grab" the current running total and execute a sub-
function allowing you to do a lot of things with the 9 memory
registers. It will only function after an operator has executed.
[You should remember that if you have hit the Equal
key (ENTER) the current running total is 0. There
is not a lot you can do with 0. So use M after +,/,
*,S and sometimes -, C or R.]
Upon execution, a window will pop up displaying the "grabbed"
total and asking you which memory register you want to work with.
Select 1 - 9 (or 0 to just return to the calculator).
Assuming you choose 1 - 9, the current value of that register will
be shown and a series of options listed. Select the option you
want. The result will be transferred to the selected register and
a summary of what has happened will be displayed for you. At that
point, just hit any key to return to the calculator. The stored
value can simply be used to verify another calculation, called again
and used in this sub-function, or Recalled into the calculator as
explained below. If any memory register has a value, the "M" box
will be highlited.
Recall Memory (R):
Recall will "grab" a stored memory value and transfer it to the
calculator based on the operation set by the current operator.
It will only work after an operator has been issued and will have
no affect if the selected memory register value is 0.
Upon execution, a window will pop up asking you which memory
register value to transfer. The window will also show you the
current "inherent total" (running total of the calculator) and an
indication of what you are about to do to that "inherent total"
based on the current mathematical operator. This indication is
significant because once you choose a register, the rest is
automatic.
This may sound complicated, and I guess it is (a little), but after
you try it a few times it should be clear. The main thing to
remember is that not only will a value be transferred, but the current
operator will also be issued. This is intentional for the sake of
speed. It saves a lot of keystrokes. You can get the same results
by issuing an operator, keying the number you want by looking at
the memory register and then issuing another operator.
Formula Generator (G):
The formula generator is a complete sub-function with its own help
screens and procedures. It allows you to input a formula similar
to a spreadsheet cell. This function was included mainly to assist
in calculations where the order of execution is important. Example:
3 * 2 + 4 equals 10, but 3 * (2 + 4) equals 18. See what I mean.
(G)enerate will display a separate set of windows and be ready for
input. In Generate, H will scroll through 4 help panels, C will capture
any result and allow you to store it in the Memory function; Esc will
return you to the calculator.
RESIDENT NOTES (implemented by /M command parameter):
When KDCalc is called via /M, a short message will be displayed telling
you that the load was successful, appx. amount of memory used and
the "Hot-Key" combination required to pop it up.
After loading, hit the Hot-Key combination whenever you want to use
the calculator. It has been tested over many of the commonly used
software programs. However, this is still a TSR, and as such, will
undoubtedly be incompatible with some programs and other TSR's. BE
WARNED.
There are only two significant differences between the resident mode
and the non-resident mode:
(1) The resident version retains whatever you have done at all
times. (The non-resident mode always starts from scratch.)
(2) A Shift/x (this actually ends up being a lowercase x because
the CapsLock is on whenever you are in the calculator),
will exit the calculator and "put" the last non-cleared
TOTAL at your cursor location. You may have to press a key
to accept the value -- this seems to vary with software.
(Shft/x also exits from the non-resident mode, but does not
transfer a number.)
REQUISITE DISCLAIMER and OTHER STUFF:
Every reasonable attempt has been made to offer a fun product that
may be of some use and be "bug" free. I (the author) can, however,
offer no guarantees as to the suitability or use of this program.
Therefore (here we go)...
THIS PRODUCT IS PROVIDED "AS IS" AND
WITHOUT WARRANTIES EXPRESS OR IMPLIED.
THE USER ASSUMES ALL RISK ASSOCIATED
WITH THE USE OF THIS PROGRAM.
You may copy and distribute this program freely. Please don't
charge for it and please provide this DOC file with it.
Anyone who is interested, can send the author (me) $5.00 or so.
(Mainly, I'm curious to see if anyone is interested!)
David A. Befort
KD Ranch Enterprises (c)
Rt.3, Box 8080
Bartlesville, Ok. 74003
P.S. While I'm not a programmer by profession, I have written a few
other things -- usually because I can't find or buy precisely
what I'm looking for. You may see some of these floating around.
[All of my programs begin with KD].
KDQwik - a small, easy word processor. Extremely straight
forward for a beginner or an executive. (not under
general release as of 4/26/89).
KDGraph - a pull-down menu driven graphics package for EGA/VGA.
It's fast and does some 3D stuff along with your basic
bars,lines and pies.
KDCalcG - an EGA/VGA graphics version of KDCalc. Has a few less
functions and no pop-up mode.
KDLogic - a set of 5 brain teaser logic puzzles (HiQ,Minefield,
Mastermind,Fifteen Squares and Towers). Program can
made memory resident for quick pop up and down.
KDPoker - There are a lot of good blackjack games, but I couldn't
find a good, true rendition of the Video Poker machines
that are now extremely popular in Las Vegas, Reno, etc.
Two commercial versions I bought were awful. This plays
pretty much like the real thing.
KDPokanl- This is kind of a companion program to KDPoker. It has
two modes - one, a PLAY mode which will play much like
the games included in KDPoker. The other - ANALYSIS mode
which allows you to set up any hand, hold the cards you
want and draw to it repeatedly to help determine the best
strategies to play video poker.